package com.g2room.bigdata.hadoop.hdfs;

import org.apache.hadoop.fs.permission.FsPermission;

public class HdfsFileTo {
    /**
     * 文件名称
     */
    private String name;
    /**
     * 类型：文件或文件夹
     */
    private boolean isDir;
    /**
     * 文件权限
     */
    private FsPermission permission;
    /**
     * 所属人员
     */
    private String owner;
    /**
     * 所属分组
     */
    private String group;
    /**
     * 最后修改时间
     */
    private long lastModified;
    /**
     * 副本数
     */
    private int replication;
    /**
     * block数
     */
    private long blockSize;
    /**
     * 大小
     */
    private long size;

    public boolean isDir() {
        return isDir;
    }

    public void setDir(boolean dir) {
        isDir = dir;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public FsPermission getPermission() {
        return permission;
    }

    public void setPermission(FsPermission permission) {
        this.permission = permission;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public long getLastModified() {
        return lastModified;
    }

    public void setLastModified(long lastModified) {
        this.lastModified = lastModified;
    }

    public int getReplication() {
        return replication;
    }

    public void setReplication(int replication) {
        this.replication = replication;
    }

    public long getBlockSize() {
        return blockSize;
    }

    public void setBlockSize(long blockSize) {
        this.blockSize = blockSize;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    @Override
    public String toString() {
        return "HdfsFileTo{" +
                "name='" + name + '\'' +
                ", isDir=" + isDir +
                ", permission=" + permission +
                ", owner='" + owner + '\'' +
                ", group='" + group + '\'' +
                ", lastModified=" + lastModified +
                ", replication=" + replication +
                ", blockSize=" + blockSize +
                ", size=" + size +
                '}';
    }
}
